﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfSetInnerPayPwd.aspx.cs" Inherits="msBsc.WebUi.wMall.Seller.wfSetInnerPayPwd" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sHead.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sFoot.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Seller/sDjackInfo.css" rel="stylesheet" />

    <link href="/themes/wStyle1/css/usermenu.css" rel="stylesheet" />
    <title>支付密码设置</title>
    <style>
        input[type=password] {
            border: 0;
            border: 1px solid #808080;
            width: 300px;
            height: 30px;
            line-height: 30px;
        }

            input[type=password]:hover {
                border: 1px solid #0094ff;
            }

        input[type=button] {
            width: 80px;
            height: 28px;
            text-align: center;
            line-height: 28px;
            border: 0;
            background-color: #7abd54;
            color: #fff;
            font-size: 14px;
            font-family: 微软雅黑;
            cursor: pointer;
        }

            input[type=button]:hover {
                opacity: 0.8;
            }

        .bind-notice-msg {
            width: 770px;
            padding: 10px 15px;
            border: 1px solid #f60;
            font-family: 微软雅黑;
            font-size: 16px;
            color: #0094ff;
            margin-bottom: 20px;
            text-indent: 32px;
        }

        .content-wrap {
            width: 100%;
            padding: 20px;
        }

            .content-wrap span {
                display: table-cell;
                padding-right: 15px;
            }

        .content-row {
            line-height: 45px;
        }

        .bindAlipay-title {
            width: 780px;
            height: 35px;
            line-height: 35px;
            font-family: 微软雅黑;
            font-size: 18px;
            color: #fff;
            background-color: #0094ff;
            padding-left: 20px;
        }

        .bindAlipay-content {
            width: 798px;
            border: 1px solid #808080;
        }

        .bindAlipayInfo {
            margin-top: 15px;
        }

        .notice-title {
            width: 120px;
            text-align: right;
            font-family: 微软雅黑;
            font-size: 14px;
            color: #808080;
            letter-spacing: 3px;
        }

        .notice-msg {
            font-size: 12px;
            font-family: 微软雅黑;
            color: #f00;
        }

        .btnReset {
            background-color: #0094ff !important;
        }

        .ErrBorder {
            border-color: #f00 !important;
        }
    </style>
</head>
<body>
    <div class="wf_all">
        <div id="divLoginInfo">
            <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo() %>
        </div>
        <div class="main-container">
            <div class="sidebar-scroll">
                <%=msBsc.WebUi.Code.QtHtmlGet.GetDjackMenuHtml() %>
            </div>
            <div class="main-Info">
                <div class="main-menu">
                    <div class="tnavigation">
                        <a class="nav" href="#">我的地接客</a>&gt;
				        <a class="nav" href="#">个人中心</a>&gt;
				        <a class="nav-on" href="#">设置支付密码</a>
                    </div>
                </div>
                <hr />
                <div class="content-wrap">
                    <div class="bind-notice-msg">
                        支付密码的设置，可以有效的保证用户账户资金的安全。并且能够使用户快速的进行资金调动。设置支付密码时，请注意:为了保证账户的安全，请用户将支付密码和登录密码设置为两个不同的密码。
                    </div>

                    <div class="bindAlipayInfo">
                        <div class="bindAlipay-title">设置支付密码</div>
                        <div class="bindAlipay-content">
                            <div class="content-row">
                                <span class="notice-title">支付密码:</span>
                                <span class="cust-input">
                                    <input type="password" id="pwdUserPayPwd" value="" placeholder="请输入支付密码" />
                                </span>
                                <span class="notice-msg notice-msg-aliaccount"></span>
                            </div>
                            <div class="content-row">
                                <span class="notice-title">确认密码:</span>
                                <span class="cust-input">
                                    <input type="password" id="pwdConfirm" value="" placeholder="请再次输入支付密码" />
                                </span>
                                <span class="notice-msg notice-msg-confirm"></span>
                            </div>
                            <div class="content-row">
                                <span class="notice-title"></span>
                                <span class="cust-input">
                                    <input type="button" id="submitPayPwd" value="确认设置" />
                                    <input type="button" class="btnReset" id="resetPayPwd" value="重置内容" />
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--start JS引用-->
        <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
        <script src="/jqPlugin/js/jBase.js"></script>
        <script src="/jqPlugin/js/jBPage.js"></script>
        <script src="/jqPlugin/js/laytpl.js"></script>
        <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>

        <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
        <script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
        <!--end JS引用-->
        <script type="text/javascript">
            function ResetBindInfo() {
                $("#resetPayPwd").click(function () {
                    $("#pwdUserPayPwd").val("");
                    ShowSuccessMsg("pwdUserPayPwd", "notice-msg-aliaccount")
                })
            }
            ResetBindInfo();

            $(function () {
                $("#submitPayPwd").click(function () {
                    SetPayPwdInfo();
                })

                $("input[type=password]").keyup(function () {
                    ShowSuccessMsg($(this).attr("id"), "notice-msg")
                })
            })

            function SetPayPwdInfo() {
                $("#submitPayPwd").attr("disabled", "disabled");
                $("#submitPayPwd").val("正在设置...");
                var userPayPwd = $.trim($("#pwdUserPayPwd").val());
                var confirmPwd = $.trim($("#pwdConfirm").val());

                if (IsNull(userPayPwd)) {
                    ShowErrMsg("pwdUserPayPwd", "notice-msg-aliaccount", "支付密码不能为空");
                    return;
                }

                if (IsNull(confirmPwd)) {
                    ShowErrMsg("pwdConfirm", "notice-msg-confirm", "确认密码不能为空");
                    return;
                }

                if (userPayPwd.length < 6 || userPayPwd.length > 16) {
                    ShowErrMsg("pwdUserPayPwd", "notice-msg-aliaccount", "支付密码必须在6~16位之间");
                    return;
                }

                if (userPayPwd != confirmPwd) {
                    ShowErrMsg("pwdConfirm", "notice-msg-confirm", "支付密码与确认密码不一致");
                    return;
                }

                var oparm = new jsonRow();
                oparm.AddCell("ACTION", "SetPayPwdInfo");
                oparm.AddCell("userPayPwd", userPayPwd);
                ajaxComm(oparm, null, function () {
                    $("#submitPayPwd").val("确认设置");
                    $("#submitPayPwd").removeAttr("disabled");
                });
            }

            function ShowErrMsg(ErrSourceId, MsgClass, MsgStr) {
                $("#" + ErrSourceId).addClass("ErrBorder")
                $("." + MsgClass).text("*" + MsgStr)
                $("#submitPayPwd").val("确认设置");
                $("#submitPayPwd").removeAttr("disabled");
            }

            function ShowSuccessMsg(SuccessSourceId, MsgClass) {
                $("." + MsgClass).text("")
                $("#" + SuccessSourceId).removeClass("ErrBorder")

            }

            function SetPayPwdSuccess() {
                alert("支付密码设置成功，请牢记支付密码。\r\n为了您的财产安全，请不要将支付密码泄露给任何人。");
                window.location.href = IsNull(GetQueryStr("ReturnUrl")) ? '/ws_UserInfo.htm' : GetQueryStr("ReturnUrl");
            }
        </script>

        <%=msBsc.WebUi.Code.QtHtmlGet.GetFloorHtml() %>
    </div>
</body>
</html>
